import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Details from '../components/Details.vue'
import login from '../views/login.vue'
import cart from '../views/cart.vue'
import Edit from '../components/Edit.vue'
import AAA from '../components/HelloWorld.vue'
import TalkAbout from '../views/TalkAbout.vue'
Vue.use(VueRouter)

const routes = [{
        path: "/AAA",
        name: "AAA",
        component: AAA
    },



    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/interests',
        name: 'interests',
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/interests.vue')
    },

    {
        path: '/flower',
        name: 'flower',
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/flower.vue')
    },
    {
        path: '/friends',
        name: 'friends',
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/friends.vue')
    },

    {
        path: '/Details/:id',
        name: 'Details',
        component: Details
    },
    {
        path: '/login/',
        name: 'login',
        component: login
    },
    {
        path: '/cart/:id',
        name: 'cart',
        component: cart
    },
    {
        path: '/Edit/:id',
        name: 'Edit',
        component: Edit
    },
    {
        path: '/TalkAbout',
        name: 'TalkAbout',
        component: TalkAbout
    }



]

const router = new VueRouter({
    routes
})

export default router